﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/AdminPanel/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<WebMVC.Areas.AdminPanel.Models.TemplateViewModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Template list</h2>

    <table>
        <tr>
            
            <th>
                Id
            </th>
            <th>
                NameEn
            </th>
            <th>
                NameRu
            </th>
            <th>
                NameAm
            </th>
            <th>
                CreateDate
            </th>
            <th>
                ImagePath
            </th>
            <th>Action</th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: item.Id %>
            </td>
            <td>
                <%: item.NameEn %>
            </td>
            <td>
                <%: item.NameRu %>
            </td>
            <td>
                <%: item.NameAm %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.CreateDate) %>
            </td>
            <td>
                <%: item.ImagePath %>
            </td>
            
            <td>
                <%= Html.ActionLink("Edit", "Edit", new { id = item.Id }, new {@class="icon-link edit-link" })%> |
                <%= Html.ActionLink("Delete", "Delete", new { id = item.Id }, new { @class = "icon-link delete-link" })%>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New Template", "Create", null, new { @class = "icon-link create-link" })%>
    </p>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
</asp:Content>

